package o;

import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import androidx.annotation.Nullable;

public class dn implements dm {
    final RectF ˏ = new RectF();

    public void ˎ() {
        dr.ˏ = new d(this) {
            final /* synthetic */ dn ˊ;

            {
                this.ˊ = r1;
            }

            public void ˎ(Canvas canvas, RectF rectF, float f, Paint paint) {
                float f2 = 2.0f * f;
                float width = (rectF.width() - f2) - 1.0f;
                float height = (rectF.height() - f2) - 1.0f;
                if (f >= 1.0f) {
                    float f3 = f + 0.5f;
                    this.ˊ.ˏ.set(-f3, -f3, f3, f3);
                    int save = canvas.save();
                    canvas.translate(rectF.left + f3, rectF.top + f3);
                    canvas.drawArc(this.ˊ.ˏ, 180.0f, 90.0f, true, paint);
                    canvas.translate(width, 0.0f);
                    canvas.rotate(90.0f);
                    canvas.drawArc(this.ˊ.ˏ, 180.0f, 90.0f, true, paint);
                    canvas.translate(height, 0.0f);
                    canvas.rotate(90.0f);
                    canvas.drawArc(this.ˊ.ˏ, 180.0f, 90.0f, true, paint);
                    canvas.translate(width, 0.0f);
                    canvas.rotate(90.0f);
                    canvas.drawArc(this.ˊ.ˏ, 180.0f, 90.0f, true, paint);
                    canvas.restoreToCount(save);
                    canvas.drawRect((rectF.left + f3) - 1.0f, rectF.top, 1.0f + (rectF.right - f3), rectF.top + f3, paint);
                    canvas.drawRect((rectF.left + f3) - 1.0f, rectF.bottom - f3, 1.0f + (rectF.right - f3), rectF.bottom, paint);
                }
                canvas.drawRect(rectF.left, rectF.top + f, rectF.right, rectF.bottom - f, paint);
            }
        };
    }

    public void ˋ(do doVar, Context context, ColorStateList colorStateList, float f, float f2, float f3) {
        Drawable ˋ = ˋ(context, colorStateList, f, f2, f3);
        ˋ.ˎ(doVar.ˋ());
        doVar.ˎ(ˋ);
        ॱ(doVar);
    }

    private dr ˋ(Context context, ColorStateList colorStateList, float f, float f2, float f3) {
        return new dr(context.getResources(), colorStateList, f, f2, f3);
    }

    public void ॱ(do doVar) {
        Rect rect = new Rect();
        ˋ(doVar).ॱ(rect);
        doVar.ॱ((int) Math.ceil((double) ˊ(doVar)), (int) Math.ceil((double) ˎ(doVar)));
        doVar.ॱ(rect.left, rect.top, rect.right, rect.bottom);
    }

    public void ʽ(do doVar) {
    }

    public void ʼ(do doVar) {
        ˋ(doVar).ˎ(doVar.ˋ());
        ॱ(doVar);
    }

    public void ˏ(do doVar, @Nullable ColorStateList colorStateList) {
        ˋ(doVar).ˊ(colorStateList);
    }

    public void ˏ(do doVar, float f) {
        ˋ(doVar).ˎ(f);
        ॱ(doVar);
    }

    public float ˏ(do doVar) {
        return ˋ(doVar).ॱ();
    }

    public void ॱ(do doVar, float f) {
        ˋ(doVar).ˋ(f);
    }

    public void ˎ(do doVar, float f) {
        ˋ(doVar).ॱ(f);
        ॱ(doVar);
    }

    public float ˊ(do doVar) {
        return ˋ(doVar).ˏ();
    }

    public float ˎ(do doVar) {
        return ˋ(doVar).ˊ();
    }

    private dr ˋ(do doVar) {
        return (dr) doVar.ॱ();
    }
}
